Function isotope::parser::constraints [−][src]
pub fn constraints(input: &str) -> IResult<&str, Constraints>
Expand description
Parse a set of constraints on a lifetime or instant
Examples
use value::relationships::*; assert_eq!(constraints("{}").unwrap(), ("", Constraints(vec![]))); let test_constraints = Constraints(vec![ Constraint(LE, "x".to_owned()), Constraint(EQ, "y".to_owned()), Constraint(NE, "z".to_owned()) ]); assert_eq!(constraints("{<= x, == y, != z}").unwrap(), ("", test_constraints));